import * as echarts from "echarts/core";
import { LineChart, PieChart } from "echarts/charts";
import {
    TooltipComponent,
    GridComponent,
    LegendComponent,
} from "echarts/components";

import { CanvasRenderer } from "echarts/renderers";
import type { EChartsOption } from "echarts";

echarts.registerTheme("myTheme", {
    textStyle: {
        fontFamily: "AlibabaPuHuiTi-2-55-Regular",
    },
});

echarts.use([
    LineChart,
    PieChart,
    TooltipComponent,
    GridComponent,

    CanvasRenderer,
    LegendComponent,
]);

export default echarts;
export { EChartsOption };
